﻿using System;

namespace XStudio.XCRF.Data.Business.Permissions
{
    /// <summary>
    /// 表示匿名问权限
    /// </summary>
    [AttributeUsage(AttributeTargets.Class | AttributeTargets.Method, AllowMultiple = false, Inherited = false)]
    public class AnonymousAttribute : BasePermissionAttribute
    {
        /// <summary>
        /// 表示匿名问权限
        /// </summary>
        /// <param name="allowAnonymous">是否允许匿名访问</param>
        public AnonymousAttribute(bool allowAnonymous)
        {
            _AllowAnonymous = allowAnonymous;
        }
        /// <summary>
        /// 是否允许匿名访问
        /// </summary>
        private bool _AllowAnonymous;
        /// <summary>
        /// 获取是否允许匿名访问
        /// </summary>
        public bool AllowAnonymous { get { return _AllowAnonymous; } }
    }
}
